package com.winter.mapper;

import com.winter.model.NewCollect;

import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

import jodd.madvoc.meta.In;

@Repository
public interface NewCollectMapper {
    int deleteByPrimaryKey(String id);

    int insert(NewCollect record);

    int insertSelective(NewCollect record);

    NewCollect selectByPrimaryKey(String id);

    int updateByPrimaryKeySelective(NewCollect record);

    int updateByPrimaryKey(NewCollect record);

    NewCollect selectCollect(@Param("id") String id, @Param("type") Integer type, @Param("userId") Long userId);

    int deleteBySourceIdAndType(@Param("sourceId") String sourceId, @Param("type") String type, @Param("userId") Long userId);

    NewCollect selectUserCollect(@Param("id") String id, @Param("userId") Long userId, @Param("type") Integer type);

    List<NewCollect> selectByUserId(@Param("userId") Long userId, @Param("type") String type);

    List<NewCollect> get(@Param("id") String id, @Param("type") int type);

    void deleteByGossip(@Param("sourceId") String sourceId, @Param("type") Integer type);
}